:root {
  --noir: #111;
  --jaune: #fcd34d;
  --rouge: #d90429;
  --gris: #f5f5f5;
  --bleu: #14213d;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: var(--gris);
  color: var(--bleu);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

header {
  background: linear-gradient(120deg, var(--bleu), var(--noir));
  color: white;
  text-align: center;
  padding: 25px 10px;
}

header h1 {
  margin: 0;
  font-size: 2.5em;
  letter-spacing: 1px;
}

header p {
  margin: 5px 0 15px;
  font-style: italic;
  color: var(--jaune);
}

nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius);
}

main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding: 40px;
}

article h2 {
  font-size: 1.8em;
  margin-top: 0;
  border-left: 5px solid var(--rouge);
  padding-left: 10px;
}

figure {
  margin: 0;
}

figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

figcaption {
  text-align: center;
  font-style: italic;
  margin-top: 5px;
  color: var(--bleu);
  opacity: 0.8;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th, td {
  padding: 12px;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: var(--rouge);
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
}

tr:nth-child(even) td {
  background-color: #f9f9f9;
}

.table-container {
  overflow-x: auto;
}

.grille-actus {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.carte {
  background-color: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.carte img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.carte h4 {
  color: var(--rouge);
  margin: 10px;
  font-size: 1.1em;
}

.carte p {
  margin: 0 10px 15px;
  color: #333;
  font-size: 0.95em;
}

footer {
  background-color: var(--bleu);
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 0.9em;
}

@media (max-width: 1000px) {
  main {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px;
  }

  header h1 {
    font-size: 2em;
  }

  nav {
    gap: 10px;
  }

  nav a {
    padding: 6px 10px;
    font-size: 0.9em;
  }

  article h2 {
    font-size: 1.5em;
  }

  figure img {
    border-radius: 10px;
  }

  .grille-actus {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 600px) {
  body {
    font-size: 0.9em;
  }

  header {
    padding: 20px 5px;
  }

  header h1 {
    font-size: 1.6em;
  }

  nav {
    flex-direction: column;
    gap: 8px;
  }

  nav a {
    background-color: var(--rouge);
    border-radius: 6px;
  }

  main {
    padding: 20px;
  }

  figure img {
    height: auto;
  }

  .grille-actus {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.85em;
  }
}